# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Timothée Girard <aur@timotheegirard.com>
# Contributor: Eduardo Sánchez Muñoz <eduardosanchezmunoz@gmail.com>

pkgname=htmlcxx
pkgver=0.87
pkgrel=3
pkgdesc="A simple non-validating CSS1 and HTML parser for C++."
arch=('loong64' 'x86_64')
url="http://gcc-libs.sourceforge.net/"
license=('LGPL')
depends=('glibc')
provides=('htmlcxx' 'libhtmlcxx' 'libcss_parser')
source=("https://sourceforge.net/projects/$pkgname/files/v$pkgver/$pkgname-$pkgver.tar.gz"
        htmlcxx-la64.patch)
sha256sums=('5d38f938cf4df9a298a5346af27195fffabfef9f460fc2a02233cbcfa8fc75c8'
            '79994572157ce98aec93b6e2c3a3c3e93e3f8c848a12ca69cdce90399dcb9a5b')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i $srcdir/htmlcxx-la64.patch
}

build() {
  cd $pkgname-$pkgver

  LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
